public class Test {
    public static void main(String[] args) {
        Dog dog = new Dog("小青蛙",2);
        System.out.println(dog.name);
    }
}

abstract class Animal{
    String name;
    int age;
    public void eat(){
    }
    public Animal(){
        this("小猫",10);
        System.out.println("这个不含参数的父类构造方法被调用了");
    }
    public Animal(String s,int age){
        this.name = s;
        this.age = age;
    }
}

class Dog extends Animal{
    public Dog(String s,int age){
        super();
    }
}